home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / loTeX / loTeX.app / XText0.h < prev    next >
Encoding:
Text File  |  1992-04-14  |  2.0 KB  |  61 lines

  1. /*    This file is part of the XText package (version 0.8)
  2.     Mike Dixon, April 1992
  3.     
  4.     Copyright (c) 1992 Xerox Corporation.  All rights reserved.
  5.  
  6.     Use and copying of this software and preparation of derivative works based
  7.     upon this software are permitted.  This software is made available AS IS,
  8.     and Xerox Corporation makes no warranty about the software or its
  9.     performance.
  10. */
  11.  
  12. #import <appkit/Text.h>
  13.  
  14. /*    XText0 is the 'bare' extensible Text class; it provides the support for
  15.     key bindings, but doesn't provide any of the useful methods you're likely
  16.     to want to bind them to.
  17.  
  18.     The instance variables are
  19.         nextAction        the action that will interpret the next key
  20.         initialAction    the basic action used to interpret keys (generally
  21.                         an XTDispatchAction)
  22.         errorStream        used to report errors
  23.  
  24.     In normal operation nextAction == initialAction, but an action may
  25.     change nextAction to cause the next key to be interpreted specially.
  26.     For example, this is used to implement ctrl-q (quote next char), and
  27.     could also be used to implement emacs-style prefix maps.
  28.  
  29.     Most of the methods are all self-explanatory;  the ones that might not
  30.     be are
  31.         newFieldEditorFor:initialAction:estream:
  32.                                 should be called from a window's delegate's
  33.                                 getFieldEditor:for: method; returns an XText
  34.                                 for editing the window's fields
  35.         unboundKey                just beeps
  36.         disableAutodisplay        like setAutodisplay:NO, except that it does
  37.                                 nothing if this is a field editor (to work
  38.                                 around a bug in text fields)
  39.  
  40.     The default initialAction is nil, which just causes all key events to
  41.     be handled by the superclass (i.e. Text).
  42. */
  43.  
  44. @interface XText0:Text
  45. {
  46.     id nextAction;
  47.     id initialAction;
  48.     id errorStream;
  49. }
  50. + newFieldEditorFor:win initialAction:action estream:errs;
  51. - initFrame:(const NXRect *)frameRect text:(const STR)theText
  52.     alignment:(int)mode;
  53. - setErrorStream:errs;
  54. - errorStream;
  55. - setInitialAction:action;
  56. - initialAction;
  57. - setNextAction:action;
  58. - unboundKey;
  59. - disableAutodisplay;
  60. @end
  61.